package org.neuedu.ssmp.crm.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.neuedu.ssmp.crm.entity.CustomerLost;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.neuedu.ssmp.crm.entity.Orders;

import java.time.LocalDate;
import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author MoonHolder
 * @since 2019-12-09
 */
public interface CustomerLostMapper extends BaseMapper<CustomerLost> {

    List<CustomerLost> queryAll();

    List<CustomerLost> queryAll(@Param(Constants.WRAPPER) Wrapper wrapper);

    List<CustomerLost> vagueQusery(@Param("name") String name, @Param("username") String username, @Param("state") String state);

    List<CustomerLost> queryAlls(@Param("customerId") int customerId);

    int update(@Param("id") int id,
               @Param("content") String content,
               @Param("addMeasures") String addMeasures,
               @Param("lostCause") String lostCause,
               @Param("state") String state,
               @Param("lostDay") LocalDate lostDay);

    int inserts(@Param("customerId") int customerId, @Param("orderTime") LocalDate orderTime);

    List<CustomerLost> myQuery();

    List<Integer> cId();
}
